
local ui = class.clicked_panel:builder 
{
    sync_name = '玩家-升级成长装备',
    show_flag = false,
    count = 2,
    x = 1328,
    y = 770,
    w = 192*1.18,
    h = 125*1.18,
    tip_w = 300,
    select_y = 42,
    select_w = 64,
    select_h = 64,
    select_gap = 14,
    has_ani = true,
    normal_image = [[ui\物品.tga]],
    on_button_mouse_enter = function(self,button)
        local skill = button.skill
        if skill then
            local tip = skill:get_tip() .. '|n|n|cffff0000右键连升10级|r'
            button:tooltip(skill.title or skill.name,tip)
            --ac.game:notify('游戏-显示天赋介绍',button,skill.title or skill.name,tip)
        end
    end,
    on_button_mouse_leave = function(self)
        --ac.game:notify('游戏-关闭天赋介绍')
    end,
    set_data = function(self,data)
        for a,button in ipairs(self.buttons) do
            local skill = data[a]
            button.skill = skill
            if skill then
                button:set_normal_image(skill.art)
                button.title:set_text(skill.item_level)
            end
        end
    end,
    on_button_right_clicked = function (self, button)
        if button.index and button.skill then 
            ac.sync(self.sync_name or self.name,button.index,10)
        end 
    end,
}

for a,button in ipairs(ui.buttons) do
    button:set_highlight([[UI\Buttons\HeroLevel\HeroLevel-Border.blp]])
    button.icon = button:add_panel([[core/bantouming.blp]],(button.w*0.25),button.h*0.75,button.w*0.5,button.h*0.25)
    button.title = button.icon:add_text('',0,0,nil,nil,10,5)
end


class.text:builder
{
    parent = ui,
    text = '点击强化',
    font_size = 14,
    y = -30,
    h = 30,
    align = 5,
    outline = true,
    shadow_color = 0xff000000,
    color = 0xffffff00,
}

function get_weapon_ui()
    return ui
end
